package cheme.ProcessEditor.Figures;

import org.eclipse.draw2d.FocusBorder;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.swt.graphics.Color;

public class SubprocessFig extends ChemeFigure
{
	public static final int SQUARE_INSET_AMOUNT = 4;
	
	public SubprocessFig()
	{
		int r = 220 + (int)(Math.random() * 100.0) % 30;
		int g = 220 + (int)(Math.random() * 100.0) % 30;
		int b = 220 + (int)(Math.random() * 100.0) % 30;
		
		Color bgColor = new Color(null, r, g, b);
		
		setBackgroundColor(bgColor);
		setBorder(new FocusBorder());
		setOpaque(true);
	}
	
	@Override
	public Insets getInsets()
	{
		return new Insets(SQUARE_INSET_AMOUNT);
	}
}
